<!DOCTYPE HTML>
<html lang="ru-RU">
	<head>
		<title>{$title} :: {Module::$mainTitle}</title>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		<link rel="shortcut icon" type="image/x-icon" href="/tpl/admin/images/favicon.ico" />
		<link rel="stylesheet" type="text/css" href="/tpl/admin/css/a.css" media="all" />
		{if isset($_scripts)}
			{foreach from=$_scripts item=script}
				<script type="text/javascript" src="{$script}"></script>
			{/foreach}
		{/if}
		{if isset($_styles)}
			{foreach $_styles as $style}
				<link rel="stylesheet" type="text/css" href="{$style}" media="all" />
			{/foreach}
		{/if}
	</head>
	<body>
		<div id="header">
			<div class="menu">
				<ul>
					<li><a href="/">Просмотр</a></li><li><a href="/">Редиктирование</a></li><li class="active"><a href="/admin.php">Панель управления</a></li><li><a href="/admin.php?logout">Выход</a></li>
				</ul>
			</div>
		</div>
		<div id="content">
			<div id="left">
				<div class="menu">
					<ul>
					{foreach from=$menu item=item}
						{if count($item->Items)}
							<li>
								<span>{$item->title}</span>
								<ul>
									{foreach from=$item->Items item=subitem}
										<li{if $_module->name == $subitem->name} class="active"{/if}>
											<a style="background-image: url({$subitem->icon})" href="/admin.php?module={$subitem->name}">{$subitem->title}</a>
										</li>
									{/foreach}
								</ul>
							</li>
						{/if}
					{/foreach}
					</ul>
				</div>
			</div>
			<div id="right">
				<div class="menu">
					<ul>
					{foreach from=$submenu item=item}
						<li{if $smarty.server.REQUEST_URI == $item['url']} class="active"{/if}>
							<a href="{$item['url']}">
								{if isset($item['icon'])}
									<span style="background-image: url({$item['icon']})">{$item['title']}</span>
								{else}
									{$item['title']}
								{/if}
							</a>
						</li>
					{/foreach}
					</ul>
				</div>
				<h1 class="main_title">{Module::$mainTitle}</h1>
				{$content}
				<div class="clear"></div>
				<div id="footer" style="text-align: right">&copy; {date('Y')}</div>
			</div>
		</div>
		{if isset($errors)}<div class="errors">{$errors}</div>{/if}
	</body>
</html>